<template>
  <div id="app">
    <el-container class="main_container">
      <el-aside class="aside-box">
        <Aside></Aside>
      </el-aside>
      <el-main>
        <el-backtop :right="30" :bottom="30" />
        <MobileHeader class="mobile-header"></MobileHeader>
        <slot />
        <Footer></Footer>
      </el-main>
    </el-container>
  </div>
</template>

<script setup lang="ts">
import Footer from "@/layouts/Footer.vue";
import Aside from "@/layouts/Aside.vue";
import MobileHeader from "@/layouts/MobileHeader.vue";
</script>

<style lang="less">
@import url(@/assets/css/globalColor.less);

.main_container {
  background-color: aliceblue;
  padding-top: 20px;
  min-height: 100vh;
  height: calc(100% - 20px);

  .aside-box {
    width: 24vw !important;
  }


  .el-header {
    height: 72px !important;
    padding: 0 !important;
    position: sticky;
    width: 100%;
    position: -webkit-sticky; // 兼容 -webkit 内核的浏览器
    top: 0px;
    z-index: 10;
  }

  .el-main {
    z-index: 9;
    height: auto;
    overflow: hidden;
    padding: 0px !important;
    display: flex;
    flex-direction: column;

    .el-backtop {
      svg {
        color: @theme-color
      }
    }
  }

  .el-footer {
    padding: 0 !important;
    height: 339px;
  }
}

@media screen and (max-width: 1200px) {

  .main_container {
    padding-top: 0px;

    .el-main {
      margin: 0;
    }

    .aside-box {
      display: none;
    }
  }

}
</style>
